package com.pengshun.modules.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 商户认证,资料提交完毕后status设置为DOING，不可再编辑资料
 * 未通过审核status设置为INVALID，可以再次编辑资料提交审核
 */

@Getter
@Setter
@Entity
@Table(name="ps_merchant")
public class Merchant implements Serializable {

    private static final long serialVersionUID = 6848628578484886700L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ApiModelProperty(value="申请来源人Id")
    private Long userId;

    @Column(length = 40)
    @ApiModelProperty(value="商户名称")
    private String name;

    @Column(length = 15)
    @ApiModelProperty(value="联系人")
    private String linkman;

    @Column(length = 40)
    @ApiModelProperty(value="联系人手机号")
    private String linkmanPhone;

    @Column(length = 40)
    @ApiModelProperty(value="商户类别Id")
    private Long merchantCategoryId;

    @Column(length = 20)
    @ApiModelProperty(value="负责人姓名")
    private String idCardName;

    @Column(length = 20)
    @ApiModelProperty(value="负责人省份证号")
    private String idCardNum;

    @ApiModelProperty(value="身份证正面")
    private String idCardFrontImg;
    @Column(name = "id_card_front_imgs")
    private String idCardFrontImgs;

    @ApiModelProperty(value="身份证反面")
    private String idCardBackImg;
    @Column(name = "id_card_back_imgs")
    private String idCardBackImgs;
    private String wayPic;

    @ApiModelProperty(value="营业执照")
    private String businessLicenseImg;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @ApiModelProperty(value="身份证过期时间")
    private Date expireDate;

    @Column(length = 2)
    @ApiModelProperty(value="人工审核状态")
    private Integer reviewStatus;

    @Column(length = 100)
    @ApiModelProperty(value="审核备注")
    private String comments;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value="申请时间")
    private Date applyDate;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value="审批时间")
    private Date reviewDate;

    @ApiModelProperty(value="审批人")
    private String reviewer;

    @ApiModelProperty(value="审批人Id")
    private Long reviewerUserId;

    @Column(length = 30)
    @ApiModelProperty(value="省")
    protected String province;

    @Column(length = 30)
    @ApiModelProperty(value="市")
    protected String city;

    @Column(length = 10)
    @ApiModelProperty(value="市编码")
    protected String adcode;

    @Column(length = 30)
    @ApiModelProperty(value="区")
    protected String district;

    @Column(length = 300)
    @ApiModelProperty(value="地图子地址")
    protected String subAddress;

    @Column(length = 300)
    @ApiModelProperty(value="地图地址")
    protected String mapAddress;

    @ApiModelProperty(value="纬度")
    @Column(name = "lng_x")
    protected BigDecimal lngX;

    @ApiModelProperty(value = "经度")
    @Column(name = "lat_y")
    protected BigDecimal latY;

    @Column(length = 300)
    @ApiModelProperty(value = "详细地址")
    protected String detailAddress;
    @Column(length = 300)
    @ApiModelProperty(value = "地址")
    protected String address;
    @ApiModelProperty(value = "1营业中，2暂停营业")
    private Integer status;
    @ApiModelProperty(value = "数据状态")
    private Integer dataStatus;

    //是否法人0否1是
    private Integer isLegalPerson;

    private Integer spId;
    private Integer level;

    private Integer scId;

    //授权书
    private String bookPic;

    private Long lookNum;

    private BigDecimal score;

    private Integer businessType;


    private Integer sort;

    private String doorImg;


}


